/**
 * Copyright (c) 2017,安徽皖通科技股份有限公司 All rights reserved.
 * @data:2017年10月10日
 * @author:MaShibo
 */
package com.wttech.dzzf.process.model.user;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import com.wtkj.dao.annotation.DatabaseTable;
import com.wtkj.vo.AbstractValueObject;

import cn.com.taiji.sdk.model.comm.protocol.annotation.EnumValidate;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * OBU信息
 * 
 * @date 2017年10月10日
 * @author MaShibo
 */
@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper = false)
@DatabaseTable(tableName = "BS_OBU")
public class Obu extends AbstractValueObject {
    
    
    @Size(max = 20, message = "id最大长度为20位数字字符")
    @NotNull(message = "id必填")
    private String id;
    
    @EnumValidate(message = "brand不正确", regexp = "(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16)")
    @NotNull(message = "brand必填")
    private Integer brand;
    
    @Size(max = 100, message = "model最大长度为100为字符")
    @NotNull(message = "model必填")
    private String model;
    
    @Size(min = 17, max = 17, message = "userId为17位数字字符")
    @NotNull(message = "userId必填")
    private String userId;
    
    @Pattern(message = "vehicleId不正确", regexp = "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}_[0-9]$")
    @Size(max = 17, message = "vehicleId最大长度为17为字符")
    @NotNull(message = "vehicleId必填")
    private String vehicleId;
    
    @Size(max = 20, message = "enableTime最大长度为20为字符")
    @NotNull(message = "enableTime必填")
    private String enableTime;
    
    @Size(max = 20, message = "expireTime最大长度为20为字符")
    @NotNull(message = "expireTime必填")
    private String expireTime;
    
    @EnumValidate(message = "registeredType不正确", regexp = "(1|2)")
    @NotNull(message = "registeredType必填")
    private Integer registeredType;
    
    @Size(max = 20, message = "registeredChannelId最大长度为20为字符")
    @NotNull(message = "registeredChannelId必填")
    private String registeredChannelId;
    
    @Size(max = 20, message = "registeredTime最大长度为20为字符")
    @NotNull(message = "registeredTime必填")
    private String registeredTime;
    
    @EnumValidate(message = "installType不正确", regexp = "(1|2)")
    @NotNull(message = "installType 必填")
    private Integer installType;
    
    @Size(max = 20, message = "installChannelId最大长度为20为字符")
    private String installChannelId;
    
    @Size(max = 20, message = "installTime最大长度为20为字符")
    @NotNull(message = "installTime 必填")
    private String installTime;
    
    @EnumValidate(message = "status不正确", regexp = "(1|2|3|4|5|6|7|8)")
    @NotNull(message = "status 必填")
    private Integer status;
    
    @Size(max = 20, message = "statusChangeTime最大长度为20为字符")
    @NotNull(message = "statusChangeTime 必填")
    private String statusChangeTime;
    
    @EnumValidate(message = "operation不正确", regexp = "(1|2|3)")
    @NotNull(message = "operation 必填")
    private Integer operation = 1;

}
